#!/bin/bash
# copy SunOS

cd "`dirname $0`"

if [ $1 -a -d $1 ]
then
	OUT_MEDIA=$1
else
	OUT_MEDIA="/media/LUDO-SCL"

    if [ ! -d $OUT_MEDIA ]
    then
        echo -e "\x1b[1;31mInsert `basename $OUT_MEDIA` or set destination.\x1b[0m"
        exit 1
    fi
fi

NAME=`basename $PWD`

if [ -f ${NAME}.nds ]
then
	echo -e -n "\x1b[1;32mCopying ${NAME}.nds...\x1b[0m"
	cp ${NAME}.nds ${OUT_MEDIA}/
	echo -e "\x1b[1;32mok\x1b[0m"
fi

